|
|
In article <slr### [at] fwicom>, ron### [at] povrayorg
wrote:
> Perl uses the value of the last evaluated expression as the return value.
> Could that work?
It might, I think...does it just return at the end of the function with
the value of the last expression, or is there an equivalent to the
"return" statement in C?
It could be useful to have any "orphan" expression force a return with
the value of that expression if it is reached, that would allow multiple
exit points. Or maybe that isn't a good idea...I have found it sometimes
makes cleaner code, but I have also heard it isn't good programming
style. And constantly checking every expression for the returning
conditions might slow things down, but maybe a "return" statement could
be inserted at parse-time so the checking doesn't have to be done at
run-time...
--
Christopher James Huff
Personal: chr### [at] maccom, http://homepage.mac.com/chrishuff/
TAG: chr### [at] tagpovrayorg, http://tag.povray.org/
<><
Post a reply to this message
|
|